Using Linux, with rsvg and optipng installed:

for f in *.svg;do mkdir -p ${f%.*};for i in 16 24 32 48 64 96 128 256 512 1024;do rsvg-convert --width=$i --keep-aspect-ratio $f > ${f%.*}/${i}x${i}.png;optipng ${f%.*}/${i}x${i}.png;done;done

See https://man.archlinux.org/man/extra/librsvg/rsvg-convert.1.en for its options.
Instead of rsvg-convert one may use Inkscape (slower, same image quality): inkscape $f -w $i --export-filename ${f%.*}/${i}x${i}.png
I did not try out cairosvg, see https://superuser.com/a/1321947
